﻿<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量    
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。    
	pageContext.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 搜索商品 - 安阳师范网购系统！</title>
<meta name="description" content="男士T恤/衬衫 安阳师范网购系统！" />
<meta name="keywords" content="男士T恤/衬衫,安阳师范网购系统！" />

<link type="text/css" href="<%=basePath%>/mallstyle/css/header.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/main.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/footer.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/qq.css"
	rel="stylesheet" />
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/index.js"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/jquery.js" charset="utf-8"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/cart.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/main.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/qq.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/kissy.js"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/switchable-pkg.js"></script>
<!--[if lte IE 6]>
<script type="text/javascript" language="Javascript" src="<%=basePath%>/mallstyle/js/hoverforie6.js"></script>
<![endif]-->


<!--<editmode></editmode>-->

</head>
<body>
	<%@include file="../../../nav.jsp"%>
	<div id="header" class="w-full">
		<div class="shop-t w clearfix pb10 mb5 mt5">
			<div class="logo mt10">
				<a href="#" title="安阳师范网购系统！" class="pull-left"><img
					alt="安阳师范网购系统！" src="<%=basePath%>/mallstyle/picture/logo.gif" /></a>
			</div>
			<div class="top-search">
				<div class="top-search-box clearfix">
					<ul class="top-search-tab clearfix" style="display: none">
						<li id="index" class="current"><span>商品</span></li>
						<li id="store"><span>商家</span></li>
					</ul>
					<div class="form-fields">
						<form method="GET" action="#">
							<input type="hidden" name="app" value="search" /> <input
								type="hidden" name="act" value="index" /> <input type="text"
								name="keyword" value="" class="keyword kw_bj index_bj " /> <input
								type="submit" value="搜索" class="submit" hidefocus="true" />
						</form>
					</div>
				</div>
				<div class="top-search-keywords">
					<span>热搜：</span> <a style="color: #EE3000;" href="#">T恤</a> <a
						href="#">女衫</a> <a href="#">play boy</a> <a
						style="color: #EE3000;" href="#">连衣裙</a> <a href="#">手包</a> <a
						href="#">裤</a>
				</div>
			</div>
			<div class="header_cart">
				<div class="title clearfix">
					<b></b> <a href="<%=path%>/rest/cart/myCart">我的购物车</a><em></em>
				</div>
				<!--  	<div class="shoping">
					<span class="count-cart J_C_T_GoodsKinds">0</span>
				</div>
				<div class="shadow"></div>
				<div class="cart-list">
					<div class="nogoods clearfix">
						<b></b>购物车中还没有商品，赶紧选购吧！
					</div>
				</div>-->
			</div>
		</div>
		<div class="w-full mall-nav">
			<ul class="w clearfix">
				<li class="allcategory float-left"><a class="allsort" href="#"
					target="_blank">商品分类</a>
					<div class="allcategory-list hidden">
						<div class="content clearfix" id="itemList">
							<div class="item">
							<!-- 	<div class="pborder">
									<p>
										<a href="index.php?app=search&amp;cate_id=2022&amp;buytype="
											target="_blank">男士T恤/衬衫</a>
									</p>
								</div>
								<div class="pop" style="top: -39px">
									<div class="catlist float-left">

										<dl class="clearfix">
											<dt class="float-left">
												<a href="index.php?app=search&amp;cate_id=3&amp;buytype="><strong>男士T恤</strong></a>
											</dt>
											<dd class="float-left"></dd>
										</dl>

										<dl class="clearfix" style="border-bottom: 0">
											<dt class="float-left">
												<a href="index.php?app=search&amp;cate_id=62&amp;buytype="><strong>男士衬衫</strong></a>
											</dt>
											<dd class="float-left"></dd>
										</dl>
									</div>
									<div class="catbrand float-left"></div>
								</div>-->
							</div>
						</div>
					</div></li>
				<li class="each float-left inline-block"><a class=""
					href="../../index.jsp">首页</a></li>
				<li class="each float-left inline-block"><a class="" href="#">安阳商城</a></li>
				<li class="each float-left inline-block"><a class="" href="#">联盟商家</a></li>
				<li class="each float-left inline-block"><a class="" href="#">在线充值</a></li>
				<li class="each float-left inline-block"><a class="" href="#">话费充值</a></li>
				<li class="each float-left inline-block"><a class="" href="#">资讯中心</a></li>
				<li class="each float-left inline-block"><a class="" href="#">现金专区</a></li>
				<li class="notice float-right"></li>
			</ul>
		</div>
	</div>
	<script type="text/javascript"
		src="<%=basePath%>/mallstyle/js/search_goods.js" charset="utf-8"></script>
	<script type="text/javascript">
var upimg   = 'http://www.999000.cn/themes/mall/default/styles/default/images/up.gif';
var downimg = 'http://www.999000.cn/themes/mall/default/styles/default/images/down.gif';
imgUping = new Image();
imgUping.src = upimg;
$(function(){

	var order = '';
	var css = '';
	
		
	$(".btn-order a").click(function(){
		if(this.id==''){
			dropParam('order');// default order
			return false;
		}
		else
		{
			dd = " desc";
			if(order != '') {
				order_arr = order.split(' ');
				if(order_arr[0]==this.id && order_arr[1]=="desc")
					dd = " asc";
				else dd = " desc";
			}
			replaceParam('order', this.id+dd);
			return false;
		}
	});
	
		
	$('.attr-bottom .show-more').click(function(){
		$(this).parent().parent().children().find('.toggle').toggle();
		if($(this).find('span').html()=='展开'){
			$(this).find('span').html('收起');
			$(this).attr('class', 'hide-more');
		} else {
			$(this).find('span').html('展开');
			$(this).attr('class', '');
		}
	});



});


</script>
	<div id="main" class="w-full">
		<div id="page-search-goods" class="w mb20 mt20">
			<div class="w mb10 clearfix">
				<div class="col-main">
					<div class="location mb10 clearfix">
						<a hidefocus="true" href="#">首页</a> <span></span> <a
							hidefocus="true" href="#">所有分类</a> <span></span> 男士T恤/衬衫
					</div>

					<div class="attribute">
						<div class="selected-attr title">
							<strong>按条件筛选</strong>
						</div>
						<div class="content">
							<div class="each clearfix">
								<h4>按品牌：</h4>
								<div class="pv" ectype="ul_brand">
									<a href="javascript:void(0);" title="WQii" id="WQii">WQii<span
										class="count">(3)</span></a>
								</div>
							</div>
							<div class="each clearfix">
								<h4>按价格：</h4>
								<div class="pv" ectype="ul_price">
									<a href="javascript:void(0);" id="479 - 664">479 - 664<span
										class="count">(28)</span></a> <a href="javascript:void(0);"
										id="664 - 849">664 - 849<span class="count">(28)</span></a> <a
										href="javascript:void(0);" id="849 - 1034">849 - 1034<span
										class="count">(36)</span></a> <a href="javascript:void(0);"
										id="1034 - 1219">1034 - 1219<span class="count">(14)</span></a>
									<a href="javascript:void(0);" id="1219 - 1404">1219 - 1404<span
										class="count">(1)</span></a>
								</div>
							</div>

							<div class="each clearfix" style="border-bottom: 0;">
								<h4>按地区：</h4>
								<div class="pv" ectype="ul_region">
									<a href="javascript:void(0);" hidefocus="true" id="2117"
										title="宁夏	银川市	西夏区">宁夏 银川市 西夏区<span class="count">(107)</span></a>
								</div>
							</div>


							<div class="attr-cate">
								<ul class="attr-list clearfix" style="border-top: 0;"
									ectype="ul_cate">
									<li><a href="javascript:void(0);" title="男士T恤" id="3">男士T恤</a><span>(63)</span></li>
									<li><a href="javascript:void(0);" title="男士衬衫" id="62">男士衬衫</a><span>(44)</span></li>
								</ul>
							</div>
						</div>
					</div>

					<div class="glist w985 mt10">
						<div class="clearfix">
							<div class="list-sort">
								<div class="search-type clearfix">
									<div class="float-left btn-type">
										<a href="#" class="current">搜索商品</a>
									</div>
								</div>
								<form>
									<div class="display_mod float-left clearfix">
										<a class="qh-list" hidefocus="true" id="list"
											href="javascript:;"><i></i>列表</a> <a class="qh-squares"
											hidefocus="true" id="squares" href="javascript:;"><i></i>大图</a>
									</div>
									<div class="float-left btn-order">
										<!--<span>排序：</span>-->
										<a class="btn-order-click default-sort" id=""
											href="javascript:;">默认排序</a> <a
											class="btn-order-click order-down-gray" ectype="sales"
											id="sales" href="javascript:;">销量<i></i></a> <a
											class="btn-order-click order-down-gray" ectype="price"
											id="price" href="javascript:;">价格<i></i></a> <a
											class="btn-order-click order-down-gray" ectype="add_time"
											id="add_time" href="javascript:;">添加时间<i></i></a> <a
											class="btn-order-click order-down-gray" ectype="comments"
											id="comments" href="javascript:;">评论<i></i></a> <a
											class="btn-order-click order-down-gray" ectype="credit_value"
											id="credit_value" href="javascript:;">信用度<i></i></a> <a
											class="btn-order-click order-down-gray" ectype="views"
											id="views" href="javascript:;">人气<i></i></a>
									</div>
									<div class="float-left filter-price">
										<div class="filter-price-box">
											<b class="fp-input"> <i class="ui-price-plain">&yen;</i>
												<input type="text" name="start_price" maxlength="6" value="" />
											</b> <i class="fp-split"></i> <b class="fp-input"> <i
												class="ui-price-plain">&yen;</i> <input type="text"
												name="end_price" maxlength="6" value="" />
											</b> <a class="ui-btn-s-primary">提交</a>
										</div>
									</div>
								</form>
							</div>
							<div class="squares goods-has clearfix w985"
								ectype="current_display_mode">
								<c:forEach items="${goods }" var="goods">
									<dl class="item clearfix dl-4427">
										<dt>
											<a href="<%=path%>/rest/goods/getGoodsById?gid=${goods.gId }"
												target="_blank"><img
												src="<%=basePath%>/mallstyle/picture/small_201609221704531320.jpg" /></a>
										</dt>
										<dd class="sub-images sub-images-4427 hidden">
											<img
												src="<%=basePath%>/mallstyle/picture/small_201609221704531320.jpg"
												goods_id="4427"
												image_url="data/files/store_2/goods_93/small_201609221704531320.jpg"
												width="30" height="30" style="border: 1px #BF1B30 solid" />
											<img
												src="<%=basePath%>/mallstyle/picture/small_201609221704535468.jpg"
												goods_id="4427"
												image_url="data/files/store_2/goods_93/small_201609221704535468.jpg"
												width="30" height="30" style="border: 1px #ddd solid" /> <img
												src="<%=basePath%>/mallstyle/picture/small_201609221704541063.jpg"
												goods_id="4427"
												image_url="data/files/store_2/goods_93/small_201609221704541063.jpg"
												width="30" height="30" style="border: 1px #ddd solid" /> <img
												src="<%=basePath%>/mallstyle/picture/small_201609221704544601.jpg"
												goods_id="4427"
												image_url="data/files/store_2/goods_94/small_201609221704544601.jpg"
												width="30" height="30" style="border: 1px #ddd solid" />
										</dd>
										<dd class="desc">
											<a href="<%=path%>/rest/goods/getGoodsById?gid=${goods.gId }"
												target="_blank">${goods.gName }</a>
										</dd>
										<dd class="twofloat clearfix">
											<em> <font style="color: #EE3000;">购物券： ¥1,199.00</font>


											</em>
										</dd>
										<dd class="delivery twofloat clearfix hidden">
											<em></em><span></span>
										</dd>
										<dd class="storeinfo twofloat clearfix">
											<em><a href="#" target="_blank">安阳师范旗舰店</a></em> <span
												class="hidden"> </span>
										</dd>
										<dd class="intro hidden">
											<ul>
												<li><span>商品评价数：</span><span><a href="#">评论74条</a></span></li>
												<li><span>商家好评率：</span><span>100.00%</span></li>
												<li><span>商家信用度：</span>3367</li>
											</ul>
										</dd>
									</dl>
								</c:forEach>
							</div>
							<div class="page">
								<span class="former_no"></span> <a class="page_hover"
									href="index.php?app=search&amp;cate_id=2022&amp;page=1">1</a> <a
									class="page_link"
									href="index.php?app=search&amp;cate_id=2022&amp;page=2">2</a> <a
									class="page_link"
									href="index.php?app=search&amp;cate_id=2022&amp;page=3">3</a> <a
									class="down"
									href="index.php?app=search&amp;cate_id=2022&amp;page=2">下一页</a>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sub">
					<div class="sub-list mb10">
						<div class="title">
							<h3>搜索推荐</h3>
						</div>
						<ul class="content clearfix">
							<li class="item">
								<div class="pic">
									<a href="#" target="_blank"><img width="180" height="180"
										src="<%=basePath%>/mallstyle/picture/small_201605201035506948.jpg"></a>
								</div>
								<div class="desc">
									<a href="index.php?app=goods&amp;id=2475" target="_blank">playboy
										男士短T</a>
								</div>
								<div>
									<em> <font style="color: #EE3000;"> ¥927.00</font>
									</em>
								</div>
							</li>
							<li class="item">
								<div class="pic">
									<a href="index.php?app=goods&amp;id=2487" target="_blank"><img
										width="180" height="180"
										src="<%=basePath%>/mallstyle/picture/small_201605191707345153.jpg"></a>
								</div>
								<div class="desc">
									<a href="index.php?app=goods&amp;id=2487" target="_blank">playboy
										男士短T</a>
								</div>
								<div>
									<em> <font style="color: #EE3000;"> ¥927.00</font>
									</em>
								</div>
							</li>
							<li class="item">
								<div class="pic">
									<a href="index.php?app=goods&amp;id=2476" target="_blank"><img
										width="180" height="180"
										src="<%=basePath%>/mallstyle/picture/small_201605191019514916.png"></a>
								</div>
								<div class="desc">
									<a href="index.php?app=goods&amp;id=2476" target="_blank">playboy
										男士短T</a>
								</div>
								<div>
									<em> <font style="color: #EE3000;"> ¥927.00</font>
									</em>
								</div>
							</li>
							<li class="item" style="border-bottom: 0;">
								<div class="pic">
									<a href="index.php?app=goods&amp;id=2482" target="_blank"><img
										width="180" height="180"
										src="<%=basePath%>/mallstyle/picture/small_201609231643524655.jpg"></a>
								</div>
								<div class="desc">
									<a href="index.php?app=goods&amp;id=2482" target="_blank">playboy
										男士短T</a>
								</div>
								<div>
									<em> <font style="color: #EE3000;"> ¥927.00</font>
									</em>
								</div>
							</li>
						</ul>
					</div>
					<div class="sub-list">
						<div class="title">
							<h3>店长推荐</h3>
						</div>
						<ul class="content">
							<li class="item">
								<div class="pic">
									<a href="#"><img width="180"
										height="180"
										src="<%=basePath%>/mallstyle/picture/small_201609231610298075.jpg"></a>
								</div>
								<div class="desc">
									<a href="#">playboy 男士T恤</a>
								</div>
								<div>
									<em> <font style="color: #EE3000;"> ¥719.00</font>购
									</em>
								</div>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="recommend">
				<div class="title">
					<span></span>推荐商品
				</div>
				<div class="content clearfix"  id="goodList">
					<dl class="mb10">
						<dt>
							<a href="#" target="_blank"><img
								width="170" height="170"
								src="<%=basePath%>/mallstyle/picture/small_201609221704531320.jpg" /></a>
						</dt>
						<dd class="desc">
							<a href="#" target="_blank">playboy
								男士长袖衬衫</a>
						</dd>
						<dd class="twofloat clearfix">
							<em> <font style="color: #EE3000;"> ¥1,199.00</font>
							</em>
						</dd>
						<dd class="service"></dd>
					</dl>
					<dl class="mb10">
						<dt>
							<a href="#" target="_blank"><img
								width="170" height="170"
								src="<%=basePath%>/mallstyle/picture/small_201609221703585004.jpg" /></a>
						</dt>
						<dd class="desc">
							<a href="#" target="_blank">playboy
								男士长袖衬衫</a>
						</dd>
						<dd class="twofloat clearfix">
							<em> <font style="color: #EE3000;"> ¥1,199.00</font>
							</em>
						</dd>
						<dd class="service"></dd>
					</dl>
					<dl class="mb10">
						<dt>
							<a href="#" target="_blank"><img
								width="170" height="170"
								src="<%=basePath%>/mallstyle/picture/small_201611091351468958.jpg" /></a>
						</dt>
						<dd class="desc">
							<a href="#" target="_blank">playboy
								男士长袖衬衫</a>
						</dd>
						<dd class="twofloat clearfix">
							<em> <font style="color: #EE3000;"> ¥1,199.00</font>
							</em>
						</dd>
						<dd class="service"></dd>
					</dl>
					<dl class="mb10">
						<dt>
							<a href="#" target="_blank"><img
								width="170" height="170"
								src="<%=basePath%>/mallstyle/picture/small_201611091650426124.jpg" /></a>
						</dt>
						<dd class="desc">
							<a href="#" target="_blank">playboy
								男士长袖衬衫</a>
						</dd>
						<dd class="twofloat clearfix">
							<em> <font style="color: #EE3000;"> ¥1,199.00</font>
							</em>
						</dd>
						<dd class="service"></dd>
					</dl>
					<dl class="mb10">
						<dt>
							<a href="#" target="_blank"><img
								width="170" height="170"
								src="<%=basePath%>/mallstyle/picture/small_201611091649492615.jpg" /></a>
						</dt>
						<dd class="desc">
							<a href="#" target="_blank">playboy
								男士长袖衬衫</a>
						</dd>
						<dd class="twofloat clearfix">
							<em> <font style="color: #EE3000;"> ¥1,199.00</font>
							</em>
						</dd>
						<dd class="service"></dd>
					</dl>
					<dl class="mb10">
						<dt>
							<a href="#" target="_blank"><img
								width="170" height="170"
								src="<%=basePath%>/mallstyle/picture/small_201609221703039518.jpg" /></a>
						</dt>
						<dd class="desc">
							<a href="#" target="_blank">playboy
								男士长袖衬衫</a>
						</dd>
						<dd class="twofloat clearfix">
							<em> <font style="color: #EE3000;"> ¥1,199.00</font>
							</em>
						</dd>
						<dd class="service"></dd>
					</dl>
				</div>
			</div>
		</div>
	</div>
	<div class="clear"></div>

	<%@include file="../../../bottom.jsp"%>
	<script type="text/javascript">
		$(document).ready(function() {
			$.ajax({
	        	url:"<%=path%>/rest/category/getAllCategoryOne",
	        	contentType:"application/json;charset=UTF-8",
	        	dataType:"json",
	        	type:"post",  
	        	            	async:true,  
	        	           	 	success:function(result){
	        	           	 	$.each(result.json, function(i, item) {
	        						jQuery("#itemList").append(
	        								"<div class='item'><div class='pborder'><p><a target='_blank' href='<%=path%>/rest/goods/getGoodsByCategory?catid="
																						+ item.catId
																						+ "'>"
																						+ item.catName
																						+ "</a></p></div></div>");
															});
										},
										error : function(result) {
											alert("错误！");
										}
									});
						});
	</script>
</body>
</html>
